package com.sofwin.configer;

import com.sofwin.interceptor.LoginInterceptor;
import com.sofwin.service.UserService;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @packageName: com.sofwin.configer
 * @author: andyliu
 * @date: 2022/5/6 15:13
 * @email 115176513@qq.com
 * @description: TODO
 */
@Configuration
public class WebConfiger implements WebMvcConfigurer {
    @Autowired
    private LoginInterceptor loginInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        System.out.println("*************");
        //        registry.addInterceptor(loginInterceptor).addPathPatterns("/**")
//                .excludePathPatterns("/login")
//                .excludePathPatterns("/**/*.html")
//                .excludePathPatterns("/**/*.css")
//                .excludePathPatterns("/**/*.js")
//                .excludePathPatterns("/css/**")
//                .excludePathPatterns("/img/**");
    }
}
